/*
 * 	Additional function for tables.html
 *	Written by ThemePixels	
 *	http://themepixels.com/
 *
 *	Copyright (c) 2012 ThemePixels (http://themepixels.com)
 *	
 *	Built for Amanda Premium Responsive Admin Template
 *  http://themeforest.net/category/site-templates/admin-templates
 */

jQuery(document).ready(function(){
	
	var urlStr = window.location.pathname;
	var usrStrArr = urlStr.split('/');
	urlStr = usrStrArr[usrStrArr.length - 1];
	
//	alert(urlStr);
	
	
	// /// ----------------------------------------- /////
	// /// ---------------- Enterprise ---------------- /////
	// /// ----------------------------------------- /////
	jQuery("#enterprisetable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "enterprise": $('#enterprise').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "enterprise" },
             { "data": "phone" },
             { "data": "email" },
             { "data": "upload" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="list/'+data+'">管理员列表</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="lock/'+data+'">修改上传权限</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// ----------------------------------------- /////
	// /// ---------------- Project ---------------- /////
	// /// ----------------------------------------- /////
	jQuery("#projtable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "project": $('#project').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "project", "class": "con1" }, 
             { "data": "cost", "class": "con0" },
             { "data": "count", "class": "con1" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="list/'+data+'">关联专业</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -------------------------------------------------------///
	/// ---------------- Project Major Except ----------------///
	/// -------------------------------------------------------///
	jQuery("#majorlisttable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/" + urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "major", "class": "con1" }, 
             { "data": "moduleStr", "class": "con0" },
             { "data": "count", "class": "con1" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+urlStr+'/'+data+'">关联专业</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// --------------------------------------- /////
	// /// ---------------- Major ---------------- /////
	// /// --------------------------------------- /////
	var majortable = jQuery("#majortable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "major", "class": "con1" }, 
             { "data": "moduleStr", "class": "con0" },
             { "data": "count", "class": "con1" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="list/'+data+'">关联课组</a>&nbsp;&nbsp;<a href="../term/create/'+data+'">创建学期</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -------------------------------------------------------///
	/// ---------------- Major Module Except ----------------///
	/// -------------------------------------------------------///
	jQuery("#modlisttable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/" + urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "module": $('#module').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "module", "class": "con1" }, 
             { "data": "nessStr", "class": "con0" },
             { "data": "count", "class": "con1" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+urlStr+'/'+data+'">关联课组</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// ---------------------------------------- /////
	// /// ---------------- Module ---------------- /////
	// /// ---------------------------------------- /////
	jQuery("#moduletable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "module": $('#module').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "module", "class": "con1" }, 
             { "data": "nessStr", "class": "con0" },
             { "data": "count", "class": "con1" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="list/'+data+'">关联课程</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -------------------------------------------------------///
	/// ---------------- Module Course Except ----------------///
	/// -------------------------------------------------------///
	jQuery("#courselisttable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/" + urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "course": $('#course').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "course", "class": "con1" }, 
             { "data": "lec", "class": "con0" },
             { "data": "chapStr", "class": "con1" },
             { "data": "count", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+urlStr+'/'+data+'">关联课组</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// ------------------------------------------///
	/// ---------------- Course ----------------///
	/// ------------------------------------------///
	jQuery("#coursetable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "course": $('#course').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "course", "class": "con1" }, 
             { "data": "lec", "class": "con0" },
             { "data": "chapStr", "class": "con1" },
             { "data": "count", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="upload/'+data+'">更换图片</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="list/'+data+'">关联章节</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -------------------------------------------------------///
	/// ---------------- Course Chapter Except ----------------///
	/// -------------------------------------------------------///
	jQuery("#chaplisttable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/" + urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "chapter": $('#chapter').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "chapter", "class": "con1" }, 
             { "data": "count", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 3,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+urlStr+'/'+data+'">关联章节</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -------------------------------------------- ///
	/// ---------------- Lec ---------------- ///
	/// -------------------------------------------- ///
	jQuery("#lectable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "lec": $('#lec').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "lec" }, 
             { "data": "count" },
             { "data": "idx" }
        ],
        "columnDefs": [ { 
        	"targets": 4,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="idx/'+data+'">修改首页显示</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -----------------------------------------///
	/// ---------------- Chapter ----------------///
	/// -----------------------------------------///
	jQuery("#chaptable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "chapter": $('#chapter').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "chapter", "class": "con1" }, 
             { "data": "count", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 3,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
                return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="list/'+data+'">关联课件</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// ------------------------------------------------------///
	/// ---------------- Chapter Video Except ----------------///
	/// ------------------------------------------------------///
	jQuery("#videolisttable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/" + urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "video": $('#video').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "video", "class": "con1" }, 
             { "data": "len", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 3,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+urlStr+'/'+data+'">关联课程</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	/// -----------------------------------------///
	/// ---------------- Video ----------------///
	/// -----------------------------------------///
	jQuery("#videotable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "video": $('#video').val()
                } );
            }
        },
        "columns": [
             { "data": "seq", "class": "con0" }, 
             { "data": "video", "class": "con1" }, 
             { "data": "len", "class": "con0" }
        ],
        "columnDefs": [ { 
        	"targets": 3,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
                return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="upload/'+data+'">更换视频</a>&nbsp;&nbsp;<a href="thumb/'+data+'">更换缩略图</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="view/'+data+'">查看</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// --------------------------------------- /////
	// /// ---------------- Term ---------------- /////
	// /// --------------------------------------- /////
	jQuery("#termtable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "term": $('#term').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "term" }, 
             { "data": "major" },
             { "data": "applyDateStartStr" },
             { "data": "studyDateStartStr" }, 
             { "data": "examDateStartStr" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 7,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="edit/'+data+'">修改</a>&nbsp;&nbsp;<a href="del/'+data+'">删除</a>&nbsp;&nbsp;<a href="../bunch/'+data+'/list">班级列表</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
//	alert(123);
	
	// /// -------------------------------------------- /////
	// /// ---------------- Fina Apply ---------------- /////
	// /// -------------------------------------------- /////
	jQuery("#fina_apply_table").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val(),
                    "ent": $('#ent').val(),
                    "applyDateStart": $('#applyDateStart1').val(),
                    "applyDateEnd": $('#applyDateEnd1').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "bunch" }, 
             { "data": "major" },
             { "data": "term" },
             { "data": "enterprise" }, 
             { "data": "applyDateStr" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 7,
            "data": "applyId",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="pass/'+data+'">审核</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// -------------------------------------------- /////
	// /// ---------------- Fina Single Bunch ---------------- /////
	// /// -------------------------------------------- /////
	jQuery("#fina_single_bunch_table").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "bunch" }, 
             { "data": "major" },
             { "data": "term" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="list/'+data+'">学员列表</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// -------------------------------------------- /////
	// /// ---------------- Fina Add Bunch ---------------- /////
	// /// -------------------------------------------- /////
	jQuery("#fina_add_bunch_table").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "bunch" }, 
             { "data": "major" },
             { "data": "term" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="list/'+data+'">学员列表</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// -------------------------------------------- /////
	// /// ---------------- Fina Bunch ---------------- /////
	// /// -------------------------------------------- /////
	jQuery("#fina_bunch_table").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "bunch" }, 
             { "data": "major" },
             { "data": "term" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 5,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="list/'+data+'">学员列表</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// -------------------------------------------- /////
	// /// ---------------- Fina Student ---------------- /////
	// /// -------------------------------------------- /////
	jQuery("#fina_student_table").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "../ajax/"+urlStr,
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "realName": $('#realName').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "realName" }, 
             { "data": "idCard" },
             { "data": "phone" },
             { "data": "email" },
             { "data": "lockStr" }
        ],
        "columnDefs": [ { 
        	"targets": 6,
            "data": "id",
            "class": "con1",
            "render": function ( data, type, full, meta ) {
              return '<a href="../pass/'+urlStr+'/'+data+'">修改审核状态</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// --------------------------------------- /////
	// /// ---------------- Bunch ---------------- /////
	// /// --------------------------------------- /////
	jQuery("#bunchtable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "bunch" }, 
             { "data": "major" },
             { "data": "applyDateEndStr" },
             { "data": "studyDateEndStr" }, 
             { "data": "examDateEndStr" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 7,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
              return '<a href="'+data+'/del">删除</a>&nbsp;&nbsp;<a href="'+data+'/study">学习进度</a>&nbsp;&nbsp;<a href="'+data+'/score">成绩</a>&nbsp;&nbsp;<a href="'+data+'/upusua">上传平时成绩</a>&nbsp;&nbsp;<a href="'+data+'/upoper">上传实操成绩</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	


	
	// /// --------------------------------------- /////
	// /// ---------------- Study ---------------- /////
	// /// --------------------------------------- /////
	jQuery("#leastudytable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "sajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "realName" }, 
             { "data": "stuNo" },
             { "data": "study" }
        ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	


	
	// /// --------------------------------------- /////
	// /// ---------------- Score ---------------- /////
	// /// --------------------------------------- /////
	jQuery("#leascoretable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "cajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "major": $('#major').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "realName" }, 
             { "data": "stuNo" },
             { "data": "usua" },
             { "data": "oper" },
             { "data": "exam" },
             { "data": "total" }
        ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	
	// /// ---------------------------------------- /////
	// /// ---------------- Exam ---------------- /////
	// /// ---------------------------------------- /////
	jQuery("#examtable").DataTable({
		"processing": true,
		"filter" : false,
		"sort" : false,
		"paginate" : true,
		"paginationType" : "full_numbers",
        "serverSide": true,
        "ajax": {
            "url": "ajax",
            "type": "POST",
            "data": function ( d ) {
                return $.extend( {}, d, {
                    "question": $('#question').val()
                } );
            }
        },
        "columns": [
             { "data": "seq" }, 
             { "data": "question" }, 
             { "data": "type" },
             { "data": "relateType" },
             { "data": "relateName" },
             { "data": "count" }
        ],
        "columnDefs": [ { 
        	"targets": 6,
            "data": "id",
            "class": "con0",
            "render": function ( data, type, full, meta ) {
                return '<a href="'+data+'/create">添加答案</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+data+'/answer">答案列表</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+data+'/edit">修改试题</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+data+'/del">删除试题</a>';
            } }
          ],
          "order": [[ 1, 'asc' ]],
          "language" : {
            "processing" : "正在加载中......",
            "lengthMenu" : "每页显示 _MENU_ 条记录",
            "zeroRecords" : "正在加载中......",
            "emptyTable" : "表中无数据存在！",
            "info" : "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
            "infoEmpty" : "显示0到0条记录",
            "infoFiltered" : "数据表中共为 _MAX_ 条记录",
            "search" : "搜索",
            "paginate" : {
                "first" : "首页",
                "previous" : "上一页",
                "next" : "下一页",
                "last" : "末页"
            }
        }
	});	

	


	
	// /// TRANSFORM CHECKBOX AND RADIO BOX USING UNIFORM PLUGIN /////
	jQuery("input:checkbox,input:radio").uniform();
		
});